/**
 * 
 */
package wpmp.utils.quickbean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 用户资源，用于可显示的资源列表
 * 
 * @author Wayne.Wang<5waynewang@gmail.com>
 * @since 11:38:41 AM Dec 4, 2013
 */
public class UserView implements Serializable {

	private static final long serialVersionUID = 8940833837964373798L;

	private User user;

	private List<Entry> resources = new ArrayList<Entry>();

	private long createTime;

	private String securityId;

	public UserView() {
		this.createTime = System.currentTimeMillis();
	}

	public UserView(User user) {
		this();
		this.user = user;
	}

	public String getSecurityId() {
		return securityId;
	}

	public void setSecurityId(String securityId) {
		this.securityId = securityId;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public List<Entry> getResources() {
		return resources;
	}

	public void setResources(List<Entry> resources) {
		this.resources = resources;
	}

	public long getCreateTime() {
		return createTime;
	}

	public void setCreateTime(long createTime) {
		this.createTime = createTime;
	}

	// 资源列表
	public static class Entry implements Serializable {

		private static final long serialVersionUID = 1L;

		private Long id;
		private String name;
		private String url;
		private Long parentId;
		private String level;
		private Boolean isLeaf;
		private Integer orderNum;

		public Long getId() {
			return id;
		}

		public void setId(Long id) {
			this.id = id;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public String getUrl() {
			return url;
		}

		public void setUrl(String url) {
			this.url = url;
		}

		public Long getParentId() {
			return parentId;
		}

		public void setParentId(Long parentId) {
			this.parentId = parentId;
		}

		public String getLevel() {
			return level;
		}

		public void setLevel(String level) {
			this.level = level;
		}

		public Boolean getIsLeaf() {
			return isLeaf;
		}

		public void setIsLeaf(Boolean isLeaf) {
			this.isLeaf = isLeaf;
		}

		public Integer getOrderNum() {
			return orderNum;
		}

		public void setOrderNum(Integer orderNum) {
			this.orderNum = orderNum;
		}
	}
}
